<include file="__PUBLIC__/_header" />
<link rel="stylesheet" href="__APP_SKIN__css/login.css?v=200" />
<script src="__APP_SKIN__js/ajax.js"></script>
<style>
	#J-countTime {
		float: right;
		padding-left: 14px;
		width: 84px;
		height: 36px;
		line-height: 36px;
		color: #fff;
		font-size: 14px;
		background-color: #0c8bb4;
	}
	.am-hide{
		display: none;
	}
	.h-yanz:hover{
		color: #fff;
	}
	.login-box select {
		width: 362px;
		height: 36px;
		margin-left: 38px;
		margin-top: 20px;
		font-size: 16px;
		border: 1px solid #bababa;
		padding-left: 10px;
		color: #bababa;
		line-height: 36px;
	}
	.login-box {

		top: 10px;
	}

</style>
<body>
<div class="login_header">
	<div class="left"><img src="__APP_SKIN__images/login_logo.jpg"></div>
	<div class="right"><img src="__APP_SKIN__images/images2.png"></div>
</div>
<div class="login-forget">
	<div class="login-box">
		<h1 style="color:#2f2f2f; font-size: 18px;margin-left: 38px;margin-top: 30px;">用户注册</h1>
		<form class="am-form" id="h-submit"  method="post"  action="{:BaseController::_createUrl('passport/register')}">
			<div class="am-form-group am-form-icon">
				<input type="text" name="user_name" class="am-form-field user_name" placeholder="请输入店名">
			</div>
			<input class="phone onnull h-phone" type="text" placeholder="输入手机号" id="UserAccount" name="mobile" value="" />
			<div id="yanzhengma">
				<input class="code onnull verify_code"  id="codeinput" type="text" placeholder="输入验证码" name="verify_code" value="" />
				<span id="J-countTime" class=" am-hide">验证码 <span id="J-timer"></span>s</span>
				<a href="javascript:void(0);" class="h-yanz J-getVerCode">获取验证码</a>
			</div>
			<div class="am-form-group am-form-icon">
				<input type="password" name="password" class="am-form-field password" placeholder="设置密码">
			</div>
			<div class="am-form-group am-form-icon">
				<input type="password" class="am-form-field sure-pwd" placeholder="再次输入密码">
			</div>

			<div class="am-form-group am-form-icon">
				<select name="shop_type" id="peizhi"style="color:#000;">

				</select>
			</div>
			<div class="am-form-group am-form-icon">
				<select name="" id="J-sheng" style="color:#000; ">

				</select>
			</div>
			<div class="am-form-group am-form-icon">
				<select name="" id="J-shi" style="color:#000; ">
					<option value="">请选择市</option>
				</select>
			</div>
			<div class="am-form-group am-form-icon">
				<select name="" id="J-qu"  style="color:#000; ">
					<option value="">请选择区</option>
				</select>
			</div>
			<input type="hidden" name="address"  id="address"/>
			<div class="am-form-group am-form-icon">
				<input type="text" class="am-form-field shop_name" name="shop_name" placeholder="请输入联系人">
			</div>
			<div style="margin:10px 0 15px 38px;">我已阅读，并同意<a class="xieyi" href="javascript:void(0)" style="color:blue">《服务协议》</a></div>
			<input class="submit J_btnSubmit"  style="margin-top:10px;" type="button" id="btnLogin" value="注 册">
		</form>
	</div>
</div>

<div class="dialog" style="display:none">
	<h1>选择门店</h1>
	<div class="change">
		<ul id="shopList">
		</ul>
	</div>
</div>
<!--<div class="footer">-->
<!--<P>黔ICP备00000000号-1 Copyright  黔城一家 2015-2017，All Rights Reserved </P>-->
<!--<P>监督热线：400-000-0000 企业QQ：000000000</P>-->
<!--</div>-->


<div class="pay_bg" style="display: none;"></div>
<div class="IEpop" style="display:none;">
	<div class="IEpop_content">
		<h4>hi,&nbsp;&nbsp;您当前的浏览器版本过低，可能存在安全风险，建议升级浏览器：</h4>
		<a href="http://frxs.bj01.bdysite.com/chrome/ChromeStandalone.exe" target="_blank"  class="chrome"></a>
		<img  src="images/dianLine.png" class="dianLine"/>
		<span>或直接扫码下载APP</span>
		<div class="appaLoading">
			<img  src=""/>
		</div>
		<div class="close" onclick="closeIEpop()"></div>
	</div>
</div>
</body>
<script>
	$(function(){
$(".xieyi").click(function(){
	window.location.href='http://api.51guipiao.com/gw.php?json={"api_key":"'+configs.api_key+'","ver":"1.0.1","client_type":2,"user_id":0,"service":"Grain.article","type":1,"id":70,"api_sgin":"14a3cd45b042f8e97f442c69c401e00f"}';
})
		$(".J_btnSubmit").click(function(){
			var user_name=	$(".user_name").val(),
					mobile=	$(".h-phone").val(),verify_code=	$(".verify_code").val(),password=	$(".password").val(),
					surepwd=$(".sure-pwd").val(),peizhi=$("#peizhi option:selected").val(),sheng=	$("#J-sheng option:selected").val(),
					shi=$("#J-shi option:selected").val(),qu=$("#J-qu option:selected").val(),shop_name=$(".shop_name").val();
			if(!user_name){
				layer.tips('请输入您的店名', '.user_name', {
					tips: 3
				});
				return;
			}
			if(!mobile){
				layer.tips('请输入您的手机号', '.h-phone', {
					tips: 3
				});
				return;
			}
			if(!verify_code){
				layer.tips('请输入您的验证码', '.verify_code', {
					tips: 3
				});
				return;
			}
			if(!password){
				layer.tips('请输入您的密码', '.password', {
					tips: 3
				});
				return;
			}
			if(!surepwd){
				layer.tips('请输入您的确认密码', '.sure-pwd', {
					tips: 3
				});
				return;
			}
			if(password!=surepwd){
				layer.tips('两次密码不同', '.sure-pwd', {
					tips: 3
				});
				return;
			}
			if(!peizhi){
				layer.tips('请选择店铺类型', '#peizhi', {
					tips: 3
				});
				return;
			}
			if(!sheng){
				layer.tips('请选择省', '#J-sheng', {
					tips: 3
				});
				return;
			}
			if(!shi){
				layer.tips('请选择市', '#J-shi', {
					tips: 3
				});
				return;
			}
			if(!qu){
				layer.tips('请选择区', '#J-qu', {
					tips: 3
				});
				return;
			}
			if(!shop_name){
				layer.tips('请填写联系人', '.shop_name', {
					tips: 3
				});
				return;
			}
			var address=$("#J-sheng option:selected").text()+$("#J-shi option:selected").text()+$("#J-qu option:selected").text();
			$("#address").val(address);
			$("#h-submit").submit();
		})
		$(".J-getVerCode").click(function(){
			var mobile=	$(".h-phone").val();
			if(!mobile){
				layer.tips('请输入您的手机号', '.h-phone', {
					tips: 3
				});
				return;
			}
			registerHttpHelper.getVerifyCode(mobile,"");
		})
		registerHttpHelper.getShopType($("#peizhi"));
		registerHttpHelper.getArea('',1,$("#J-sheng"));
		$("#J-sheng").change(function () {
			var pid=$("#J-sheng option:selected").val();
			registerHttpHelper.getArea(pid,2,$("#J-shi"));
		})
		$("#J-shi").change(function () {
			var pid=$("#J-shi option:selected").val();
			registerHttpHelper.getArea(pid,3,$("#J-qu"));
		})
	})

</script>
</html>
